% GAUTIER LE BIHAN - 2020
% Replication files for "Shocks vs Menu Costs: Patterns of Price Rigidity in an Estimated Multi-Sector Menu-Cost Model?" Review of Economics and Statistics
%
% Figure Q
clear;
tic


addpath('..\..\Utilities')  

load actual_moments_k

nb_repmat=40
param=[tanh(0.0505054345653083) 0.0317270676027990  exp(-3.32869003924367) 0.69];
param=repmat(param,nb_repmat,1);
for i=1:size(param,1)
param(i,2)=0.005+0.002*(i-1)/2
end
s=size(param,1)

for jj=1:s;
    p0=param(jj,1);
    mu_c=param(jj,2);
    sig_eps_a=param(jj,3);
    rho_a=param(jj,4);   
    weight_j=0.57;
    sm_m=0;
    param_e=[p0 mu_c sig_eps_a rho_a];

   [moments, VC, IRF]=geNCalvoPlus_2Agg(sm_m, p0, mu_c, sig_eps_a, rho_a, weight_j);

   stat_rho(jj,:)=[ param_e moments VC]
  save stat_rho stat_rho;
  IRF_rho(jj,:)=[ IRF]
  save IRF_rho IRF_rho;
end
